<template>
  <div class="dashboard-editor-container" style="padding: 20px">
    <el-row :gutter="20">
      <el-col :span="8">
        <el-card class="box-card" style="height: 300px">
          <div slot="header" class="clearfix">
            <span style="font-size: 20px;font-weight: bold;">项目介绍</span>
          </div>
          <div style="font-size: 20px;text-indent: 2em;padding: 0px;">CoffeeWx是一款基于VUE、Spring Boot的前后端分离的微信公众号管理系统、支持多公众号。</div>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="box-card" style="height: 300px">
          <div slot="header" class="clearfix">
            <span style="font-size: 20px;font-weight: bold;">个人信息</span>
          </div>

          <div style="width: 160px;display: inline-block;float: left">
            <pan-thumb :image="avatar" style="float: left">
              Your roles:
              <span v-for="item in roles" :key="item" class="pan-info-roles">{{ item }}</span>
            </pan-thumb>
          </div>
          <div style="display: inline-block;float: left;margin-left: 20px;margin-top: 20px">
            <table>
              <tr class="userinfo-row">
                <td class="userinfo-lable">
                  角色
                </td>
                <td class="userinfo-content">
                  <span v-for="item in roles" :key="item" style="display: inline-block;margin-right: 5px">{{ item }}</span>
                </td>
              </tr>
              <tr class="userinfo-row">
                <td class="userinfo-lable">
                  登陆名
                </td>
                <td class="userinfo-content">
                  {{ name }}
                </td>
              </tr>
              <tr class="userinfo-row">
                <td class="userinfo-lable">
                  昵称
                </td>
                <td class="userinfo-content">
                  {{ introduction }}
                </td>
              </tr>
            </table>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import PanThumb from '@/components/PanThumb'
export default {
  name: 'DashboardEditor',
  components: { PanThumb },
  data() {
    return {
      emptyGif: 'https://wpimg.wallstcn.com/0e03b7da-db9e-4819-ba10-9016ddfdaed3'
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'avatar',
      'roles',
      'introduction'
    ])
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .userinfo-row{
    height: 50px;
  }
  .userinfo-lable{
    display: inline-block;
    font-size: 20px;font-weight: bold;text-align:right;;
    margin-right: 10px;
    align:right;
    width: 80px;
  }
  .userinfo-content{
    display: inline-block;
    font-size: 20px;
  }

  .emptyGif {
    display: block;
    width: 45%;
    margin: 0 auto;
  }

  .dashboard-editor-container {
    background-color: #e3e3e3;
    min-height: 100vh;
    padding: 50px 60px 0px;
    .pan-info-roles {
      font-size: 12px;
      font-weight: 700;
      color: #333;
      display: block;
    }
    .info-container {
      position: relative;
      margin-left: 190px;
      height: 150px;
      line-height: 200px;
      .display_name {
        font-size: 48px;
        line-height: 48px;
        color: #212121;
        position: absolute;
        top: 25px;
      }
    }
  }
</style>
